package com.zhang.hui.one;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.zhang.hui.one.util.StatusBarUtils;

public class Main2Activity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        initView();
    }

    private void initView() {
        findViewById(R.id.tv_change_status_bar_color).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id) {
            case R.id.tv_change_status_bar_color:
//                changeStatusBarColorRandom();
//                CrashReport.testJavaCrash();
                break;
        }

    }

    private void changeStatusBarColorRandom() {
        StatusBarUtils.setWindowStatusBarColor(this, R.color.colorAccent);
    }

}
